package com.atde._04_structural_design_patterns.decorator;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._04_structural_design_patterns.decorator
 * @Author: Del
 * @CreateTime: 2025-06-20  14:58
 * @Description: 装饰者模式 --- 抽象饮品类
 * @Version: 1.0
 */
public abstract class Drink {

    // 描述
    public String des;

    // 价格
    private float price = 0.0f;

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    // 计算费用的抽象方法
    // 由具体的子类实现
    public abstract float cost();
}
